const { 
  getNowExchangeList,   //返回最新的几条交易信息
} = require('../lib/action');
const utils = require('../../../util/utils');

module.exports = function (app) { return new Handler(app); };
let Handler = function (app) { this.app = app; };
let handler = Handler.prototype;

//返回最新的几条交易信息
handler.getNowExchangeList = async function (num, cb) {
  try{
    //返回最新的几条交易信息
    let nowExchangeList = await getNowExchangeList.call(this, num);
    // 调用回调
    utils.invokeCallback(cb, null, { nowExchangeList });
  }catch(err){
    utils.invokeCallback(cb, err);
  }
}
